{extend name="./template/default/pc/pub/base.html" /}
{block name="seo"}
<title>{$book.book_name}全本免费阅读-{$site_name}</title>
<meta name="description"
      content="{$book.book_name}是一本{$book.cate.cate_name}小说，主角是{$book.role_name}，小说简介：{$book.summary}">
{/block}
{block name="main"}
<div class="path ">
    <a href="/">首页</a>
    <span>&gt;</span>
    <a href="/{$booklist_act}?gender={$book.cate.gender}">{$book.cate.gender == 1 ? '男生' : '女生'}</a>
    <span>&gt;</span>
    <a href="/{$booklist_act}?cate={$book.cate_id}">{$book.cate.cate_name}</a>
    <span>&gt;</span>
    <a href="#">{$book.book_name}</a>
</div>
<div class="work_brief clearfixer">
    <div class="fl detailgame">
        <div class="pic fl">
            <span><img src="{$book.cover_url}" alt=""></span>
        </div>
        <div class="brief fl">
            <div class="title clearfixer">
                <span class="name fl">{$book.book_name}</span>
                <a href="{$search_ctrl}?keyword={$book.author_name}" class="author fl"
                   target="_blank">{$book.author_name}</a>
                <span class="write fl">著</span>
            </div>
            <div class="tags clearfixer">

                <a href="{$booklist_act}?end={$book.end}">
                    <span class="fl isfinish">{$book.end == 2 ? '连载中' : '已完结'}</span>
                </a>
                {volist name="tags" id="tag" length="4"}
                <a href="#">
                    <span class="fl">{$tag.tag_name}</span>
                </a>
                {/volist}
            </div>
            <div class="hits">
                <i></i><span>{$book.words}万 字</span>
                <i></i><span>阅读 {$clicks}</span>
            </div>
            <p class="brief_text">
                {$book.summary}
            </p>
            <div class="btns">
                {if $start > -1}
                <a href="/{$chapter_ctrl}/{$start}" class="free on ui_bg_bdcolor" target="_blank">马上阅读</a>
                {else /}
                <a class="free on ui_bg_bdcolor" target="_blank">马上阅读</a>
                {/if}

                <a href="javascript:;" class="addshelf">加入书架</a>
            </div>
        </div>
    </div>
    <div class="fr detailgame_btn">
        <img src="/static/images/mp.jpg" width="200px">
    </div>
</div>
<div class="work_content clearfixer" id="content-tab">
    <div class="header" style="width: 950px;">
        <div class="tab fl j-content-tab">
            <a href="#brief">
                <span class="on">作品简介</span>
            </a>
            <a href="#catalog">
                <span class="">目录</span>
            </a>
        </div>
        <a href="#comment-tab" class="fl comment">书友评论</a>
    </div>
    <div class="tabcontent j-content-main">
        <div class="tabcontent-1 clearfixer" style="display: block;">
            <div class="column_left fl">
                <div class="summary">
                    <pre class="summary1">{$book.summary}</pre>
                </div>
                <div class="newchapter">
                    <div class="title clearfixer">
							<span class="chaptername fl">
								最新章节&nbsp;:&nbsp;&nbsp;
								<a target="_blank" href="/{$chapter_ctrl}/{$book.last_chapter_id}">{$book.last_chapter}</a>
							</span>
                        <span class="updatetime fr">
                            更新时间&nbsp;:&nbsp;
                            {$book.last_time|date='Y-m-d'}
                        </span>
                    </div>
                </div>
                <div class="reader_comments" id="comment-tab">
                    {include file="./template/default/pc/books/comment.html"}
                </div>
            </div>
            <div class="column_right fr">
                <div class="author ">
                    <div class="allbook">
                        <div class="title clearfixer">
                            <div class="text fl">作者作品</div>
                        </div>
                        <div class="all_work_content">
                            {volist name="authors" id="vo"}
                            <div class="bx-wrapper" style="max-width: 84px;">
                                <div class="bx-viewport" aria-live="polite"
                                     style="width: 100%; overflow: hidden; position: relative; height: 137px;">
                                    <div class="all_work_contentbox"
                                         style="width: 1215%; position: relative; transition-duration: 0s; transform: translate3d(0px, 0px, 0px);">
                                        <a href="/{$book_ctrl}/{$vo.param}" target="_blank"
                                           class="all_work_contentboxitem visiable" aria-hidden="false"
                                           style="float: left; list-style: none; position: relative; width: 84px; margin-right: 35px;">
                                            <img src="{$vo.cover_url}" alt="{$vo.book_name}">
                                        </a>
                                    </div>
                                </div>
                                <div class="bx-controls"></div>
                            </div>
                            {/volist}
                        </div>
                    </div>
                </div>
                <div class="same-recomend">
                    <div class="rec-title">同类推荐</div>
                    <ul class="rec-content ">
                        {volist name="recommand" id="vo" length="10"}
                        <li class="clearfixer">
                            <a href="/{$book_ctrl}/{$vo.param}" class="rec-pic fl" target="_blank">
                                <img data-original="{$vo.cover_url}" class="lazyimg" src="https://s1.ax1x.com/2018/12/13/FN8WLQ.jpg"
                                     style="display: inline;" alt="{$vo.book_name}">
                            </a>
                            <div class="rec-detail fl">
                                <a href="/{$book_ctrl}/{$vo.param}" class="rec-con-title"
                                   target="_blank">{$vo.book_name}</a>
                                <p class="rec-author">
                                    <a href="/{search_ctrl}?keyword={$vo.author_name}" target="_blank">作者 : {$vo.author_name}</a>
                                </p>
                                <p class="rec-text">
                                    {$vo.summary}
                                </p>
                            </div>
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
        </div>
        <div class="wrap1200 catebg" style="display: none;">
            <div class="cate-tit">
                <h2>作品章节</h2>
            </div>
            <div class="cate-list">
                <ul>
                    {volist name="book.chapters" id="vo"}
                    <li>
                        <a target="_blank" href="/{$chapter_ctrl}/{$vo.id}">
                            <span class="chapter_name">{$vo.chapter_name}</span>
                            <span class="chapter_date">{$vo.create_time|date='m-d'}</span>
                        </a>
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="https://lib.baomitu.com/bxslider/4.2.15/jquery.bxslider.min.js"></script>
<script>
    $(document).ready(function() {
        $('.all_work_content').bxSlider({
            mode: 'horizontal',
            speed: 800,
            randomStart:true,
            infiniteLoop:true,
            pager: false,
            controls: false,
        });
    });
    $('.addshelf').click(function () {
        $.post({
            url:`/addfavor`,
            data:{'book_id' : {$book.id} },
            success: function (res) {
                if (res.err == 1) {
                    layer.msg(res.msg,{icon: 0,shade: 0.3})
                } else {
                    layer.msg(res.msg,{icon: 1,shade: 0.3})
                }

            },
            error: function (data) {
                layer.msg(data,{icon: 0,shade: 0.3})
            }
        })
    })
</script>
{/block}